What IP would see API provider when visitor uses my serverless site "mysite com" with javascript with XMLHttpRequest xhReq.open("GET", "api-provider site com")? Would it be IP of the visitor of my site, or IP of "mysite com"? So if API provider has limits for 50 calls per minute per IP, would it be limits for every visitor of my site for 50 calls per minute, or for all users of my site totally for 50 calls per min? And what if I would use calls from node js server? Thanks so much for your reply
Also found answer to very similar question - The browser will download the contents of the JavaScript file and execute it - this all happens on the client's machine, so the XHR request will have the IP address from the client. It doesn't really matter if the script is externally hosted or embedded directly into the HTML.